
package com.herench.jwt.service.impl;

import com.herench.jwt.dao.UserDao;
import com.herench.jwt.model.User;
import com.herench.jwt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author Squall
 * @create 14/03/2018
 * @since 1.0.0
 */
@Component
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findByUsername(String username) {
        User dao = userDao.findUserByName(username);
        return dao;
    }

    @Override
    public User findByUserId(Long id) {
        return userDao.findUserById(id);
    }
}